<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "log".
 *
 * @property int $id
 * @property int $uid
 * @property int $goods_id
 * @property int $roder_id
 * @property int $status
 */
class Log extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'log';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid', 'goods_id', 'roder_id', 'status'], 'integer'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => 'Uid',
            'goods_id' => 'Goods ID',
            'roder_id' => 'Roder ID',
            'status' => 'Status',
        ];
    }

    public function getOne($uid,$goods_id,$status)
    {
        $this->uid = $uid;
        $this->goods_id =$id;
        $this->status = $status;
        return $this->save();
    }
}
